package com.ambulance.project.biz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * NHISS
 * </p>
 *
 * @author zr
 * @since 2020-04-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Nhiss对象", description="NHISS")
@TableName("biz_nhiss")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Nhiss extends Model<Nhiss> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "编号/分")
    @TableField("number")
    private String number;

    @ApiModelProperty(value = "题干/答案")
    @TableField("value")
    private String value;

    @ApiModelProperty(value = "父id")
    @TableField("pid")
    private Integer pid;


    @TableField(exist = false)
    private List<Nhiss> child;


    @ApiModelProperty(value = "已选答案")
    @TableField(exist = false)
    private Integer answer;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
